import LevelBaseControl from "../LevelCommon/LevelBaseControl";
import DialogDataConst from "../../constant/DialogDataConst";

export default class LevelControl3 extends LevelBaseControl {
    /** 沙发机关是否开启  开启才能移动沙发*/
    private isSofaOnRoom1: boolean = false;

    protected startByBase() {

    }

    public DoInteractObjLogic(_name: string): boolean {
        switch (_name) {
            /** room1     *********************************************************************************************/
            /** 调整指针正确 开启机关*/
            case "hourPoint":
                if (!this.isSofaOnRoom1) {
                    this.ShowDialog(DialogDataConst.sofa_move);
                    this.isSofaOnRoom1 = true;
                }
                break;
            /** 对沙发进行交互 先判断这个机关开没开启*/
            case "sofa":
                /** 机关没开启的时候 不能交互*/
                if (!this.isSofaOnRoom1) {
                    return false;
                }
                break;
            /** 过关*/
            case "door_02_props_In_Gate":
                this.FinishLevel();
                break;
            /** round2    *********************************************************************************************/
            default:
                break;
        }
        return true;
    }
}